<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;

class Video extends Model
{
    //多态关联
    public function comments()
    {
        return $this->morphMany('App\Models\Comment','item');
    }

    //多对多多态关联
    public function tags()
    {
        return $this->morphToMany('App\Models\Tag', 'taggable');
    }

}
